<template>
  <div>
    <div class="box1" @click="go">
      <div class="icon">
        <img :src="icon" alt="" class="img1" />
      </div>
      <div class="titless">
        <slot></slot>
      </div>
    </div>
  </div>
</template>


<script>
export default {
  props: {
    icon: {
      type: String,
      required: true,
    },
    path: {
      type: String,
      required: true,
    },
  },
  methods: {
    go() {
      this.$router.push({ path: this.path });
    },
  },
};
</script>


<style lang="scss" scoped>
.box1 {
  flex: 1;
  //   height: 100%;
  height: 3rem;
  //   border: 1px solid orange;
  display: flex;
  flex-wrap: wrap;
}
.icon,
.titless {
  color: black;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  //   font-size: 1rem;
  font-size: 0.8rem;
}
.img1 {
  width: 30%;
}
.titless_active {
  color: red;
}
</style>
